.class Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$askforroot;
.super Landroid/os/AsyncTask;
.source "Main.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/clarkehackworth/SamsungGalaxySUnlock/Main;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "askforroot"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/String;",
        "Ljava/lang/Void;",
        "Lcom/clarkehackworth/SamsungGalaxySUnlock/Codes;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/clarkehackworth/SamsungGalaxySUnlock/Main;


# direct methods
.method private constructor <init>(Lcom/clarkehackworth/SamsungGalaxySUnlock/Main;)V
    .locals 7
    .parameter

    .prologue
    .line 342
    iput-object p1, p0, Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$askforroot;->this$0:Lcom/clarkehackworth/SamsungGalaxySUnlock/Main;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 343
    const/4 v2, 0x0

    .line 348
    .local v2, st1:Ljava/lang/String;
    :try_start_0
    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v3

    const-string v4, "su"

    invoke-virtual {v3, v4}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;

    move-result-object v0

    .line 350
    .local v0, needroot:Ljava/lang/Process;
    new-instance v1, Ljava/io/DataOutputStream;

    invoke-virtual {v0}, Ljava/lang/Process;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v3

    invoke-direct {v1, v3}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    .line 351
    .local v1, root:Ljava/io/DataOutputStream;
    const-string v3, "cat /dev/block/bml3 >> /sdcard/nv_data.bak || cat /efs/.nv_data.bak >> /sdcard/nv_data.bak || cat /efs/nv_data.bak >> /sdcard/nv_data.bak\n"

    invoke-virtual {v1, v3}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 354
    const-string v3, "exit\n"

    invoke-virtual {v1, v3}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 355
    invoke-virtual {v1}, Ljava/io/DataOutputStream;->flush()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .line 357
    :try_start_1
    invoke-virtual {v0}, Ljava/lang/Process;->waitFor()I

    .line 358
    invoke-virtual {v0}, Ljava/lang/Process;->exitValue()I
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0

    .line 372
    .end local v0           #needroot:Ljava/lang/Process;
    .end local v1           #root:Ljava/io/DataOutputStream;
    :goto_0
    new-instance v3, Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$ScanForCodesTask;

    const/4 v4, 0x0

    invoke-direct {v3, p1, v4}, Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$ScanForCodesTask;-><init>(Lcom/clarkehackworth/SamsungGalaxySUnlock/Main;Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$ScanForCodesTask;)V

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/String;

    const/4 v5, 0x0

    const v6, 0x7f040011

    invoke-virtual {p1, v6}, Lcom/clarkehackworth/SamsungGalaxySUnlock/Main;->getString(I)Ljava/lang/String;

    move-result-object v6

    aput-object v6, v4, v5

    invoke-virtual {v3, v4}, Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$ScanForCodesTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    return-void

    .line 368
    :catch_0
    move-exception v3

    goto :goto_0

    .line 364
    .restart local v0       #needroot:Ljava/lang/Process;
    .restart local v1       #root:Ljava/io/DataOutputStream;
    :catch_1
    move-exception v3

    goto :goto_0
.end method

.method synthetic constructor <init>(Lcom/clarkehackworth/SamsungGalaxySUnlock/Main;Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$askforroot;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 342
    invoke-direct {p0, p1}, Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$askforroot;-><init>(Lcom/clarkehackworth/SamsungGalaxySUnlock/Main;)V

    return-void
.end method


# virtual methods
.method protected varargs doInBackground([Ljava/lang/String;)Lcom/clarkehackworth/SamsungGalaxySUnlock/Codes;
    .locals 1
    .parameter "params"

    .prologue
    .line 379
    const/4 v0, 0x0

    return-object v0
.end method

.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/clarkehackworth/SamsungGalaxySUnlock/Main$askforroot;->doInBackground([Ljava/lang/String;)Lcom/clarkehackworth/SamsungGalaxySUnlock/Codes;

    move-result-object v0

    return-object v0
.end method
